using Dew.Math;
using Dew.Math.Units;
namespace Dew.Examples()
{
void Example()
{
TOpenCLVector a,b,c;
clMtxVec.CreateIt(
out a,
out b,
out c);
try
{
a.CopyFromArray(
new double[] {1,2,3,4});
// a = [1,2,3, 4] //magnitude
b.CopyFromArray(
new double[] {1,0,1,-1});
// b = [1,0,1,-1] /phase
c.PolarToCart(a,b);
// result stored in c = projections to Re and Im axis
}
finally
{
clMtxVec.FreeIt(
ref a,
ref b,
ref c);
}
}
}